<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
    <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
    <link href="../../assets/report/css/ruler.css" rel="stylesheet" />
</head>
<body>
    <div style="margin:0 auto;padding:20px;">
        <form class="layui-form" action="" id="showForm" autocomplete="off">
            <div class="layui-form-item layui-col-xs12">
                <span class="hr-title">基础信息</span><hr>
            </div>
            <div class="layui-form-item layui-col-xs12">
                <label class="layui-form-label">标题<i class="red">*</i></label>
                <div class="layui-input-block">
                    <input type="text" id="title" name="title" win-verify="required" placeholder="请输入标题" class="layui-input" maxlength="100"/>
                </div>
            </div>
            <div class="layui-form-item layui-col-xs6">
                <label class="layui-form-label">默认宽度<i class="red">*</i></label>
                <div class="layui-input-block">
                    <input type="text" id="defaultWidth" name="defaultWidth" win-verify="required|number" placeholder="请输入默认宽度" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item layui-col-xs6">
                <label class="layui-form-label">默认高度<i class="red">*</i></label>
                <div class="layui-input-block">
                    <input type="text" id="defaultHeight" name="defaultHeight" win-verify="required|number" placeholder="请输入默认高度" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item layui-col-xs12">
                <span class="hr-title">文字模型信息</span><hr>
            </div>
            <div class="layui-form-item layui-col-xs12">
                <label class="layui-form-label">属性值选项：</label>
                <div class="layui-input-block">
                    <div class="winui-toolbar">
                        <div class="winui-tool" style="text-align: left;">
                            <button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
                            <button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
                        </div>
                    </div>
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th style="width: 30px;"></th>
                            <th style="width: 150px;">属性<i class="red">*</i></th>
                            <th style="width: 150px;">是否可编辑<i class="red">*</i></th>
                            <th style="width: 200px;">是否展示<i class="red">*</i></th>
                        </tr>
                        </thead>
                        <tbody id="useTable" class="insurance-table">
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-form-item layui-col-xs12">
                <label class="layui-form-label" style="line-height: 45px">效果图<i class="red">*</i></label>
                <div class="layui-col-xs8" style="line-height: 60px">
                    <div class="layui-col-xs10" id="printPic" style="width: 90px; height: 60px; text-align: center; line-height: 60px; background-color: white;">
                        <font>Hello, Skyeye</font>
                    </div>
                    <div class="layui-col-xs2">
                        <a href="javascript:;" class="layui-btn layui-btn-xs" id="createPic" style="margin-left: 10px;margin-top: 10px;">生成图片</a>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-col-xs12">
                <label class="layui-form-label" style="line-height: 45px">预览图<i class="red">*</i></label>
                <div class="layui-col-xs6" style="line-height: 60px">
                    <div class="layui-col-xs10" id="images">

                    </div>
                    <div class="layui-col-xs2">
                        <a href="javascript:;" class="layui-btn layui-btn-xs" id="download" style="margin-left: 10px;margin-top: 10px; display: none">下载</a>
                    </div>
                </div>
            </div>

            <div class="layui-form-item layui-col-xs12">
                <div class="layui-input-block">
                    <button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
                    <button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
                </div>
            </div>
        </form>
    </div>

    <!-- usetableTemplate -->
    <script type="text/x-handlebars-template" id="usetableTemplate">
        <tr trcusid="{{trId}}">
            <td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
            <td>
                <input type="text" id="{{propertyId}}" name="{{propertyId}}" placeholder="请选择属性" class="layui-input" win-verify="required" readonly="readonly">
                <i class="fa fa-plus-circle input-icon choosePropertyBtn" style="top: 12px;"></i>
            </td>
            <td>
                <div class="winui-radio">
                    <input type="radio" name="{{whetherEditor}}" value="1" title="是" lay-filter="{{whetherEditor}}" checked/>
                    <input type="radio" name="{{whetherEditor}}" value="2" title="否" lay-filter="{{whetherEditor}}" />
                </div>
            </td>
            <td>
                <div class="winui-radio">
                    <input type="radio" name="{{whetherShow}}" value="1" title="是" lay-filter="{{whetherShow}}" checked/>
                    <input type="radio" name="{{whetherShow}}" value="2" title="否" lay-filter="{{whetherShow}}" />
                </div>
            </td>
        </tr>
    </script>

    <script src="../../assets/lib/layui/layui.js"></script>
    <script src="../../assets/lib/layui/custom.js"></script>
    <!-- html2canvas将Dom节点在Canvas里边画出来 -->
    <script src="../../assets/html2canvas/js/html2canvas.min.js"></script>
    <!-- 将canvas图片保存成图片 -->
    <script src="../../assets/html2canvas/js/canvas2image.js"></script>
    <script src="../../assets/html2canvas/js/base64.js"></script>
    <script type="text/javascript">
        layui.config({base: '../../js/reportWordModel/'}).use('reportWordModelAdd');
    </script>
</body>
</html>